package com.example.service;

import com.example.mapper.CurriculumVitaeMapper;
import com.example.pojo.entity.CurriculumVitae;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 本文来演示
 *
 * @author 赵建云
 * @create 2023/10/30
 */
@Service
public class CurriculumVitaeServiceImpl implements CurriculumVitaeService{
    @Autowired
    private CurriculumVitaeMapper curriculumVitaeMapper;
    @Override
    public int userGood(Integer jsId, String userGood) {
        CurriculumVitae curriculumVitae = curriculumVitaeMapper.findJsId(jsId);
        if (curriculumVitae==null){
            int count = curriculumVitaeMapper.saveUserGood(jsId,userGood);
            return count;
        }else {
            int count = curriculumVitaeMapper.updateUserGood(jsId, userGood);
            return count;
        }
    }
}
